home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 23 / CU Amiga - Super CD-ROM 23 (June 1998).iso / CUCD / Programming / OUI / include / gadgets / cnumber.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  1.4 KB  |  62 lines

  1. // $Id: cnumber.h 1.3 1997/07/14 04:27:40 dlorre Exp dlorre $
  2. #ifndef CLASS_CNUMBER_H
  3. #define CLASS_CNUMBER_H
  4.  
  5. #ifndef EXEC_TYPES_H
  6. #include <exec/types.h>
  7. #endif
  8.  
  9. #ifndef LIBRARIES_GADTOOLS_H
  10. #define PLACETEXT_LEFT  0x0001  /* Right-align text on left side */
  11. #endif
  12.  
  13. #ifndef CLASS_WINDOW_H
  14. class window ;
  15. #endif
  16.  
  17. #ifndef CLASS_GADGETLIST_H
  18. class gadgetlist ;
  19. #endif
  20.  
  21. #ifndef CLASS_GADGET_H
  22. #include "gadgets/gadget.h"
  23. #endif
  24.  
  25. const char  INSIDECNUMBER = 0 ;
  26. const char  RIGHTCNUMBER = 1 ;
  27. const char  BOTTOMCNUMBER = 2 ;
  28. const char  WIDTHCNUMBER = 4 ;
  29. const char  HEIGHTCNUMBER = 8 ;
  30.  
  31.  
  32. // ========================================================================
  33. // ==========================  CNUMBER CLASS ==============================
  34. // ========================================================================
  35.  
  36.  
  37. class cnumber : public gadget
  38. {
  39.     STRPTR      norm1 ;
  40.     STRPTR      norm2 ;
  41.     STRPTR      under ;
  42.  
  43.     IntuiText   *it1 ;
  44.     IntuiText   *it2 ;
  45.     IntuiText   *it3 ;
  46.  
  47.     TextFont    *font ;
  48.     TTextAttr   *underline ;
  49.     TTextAttr   *plain ;
  50. public:
  51.     cnumber(gadgetlist *gl,
  52.             void (window::*func)(gadget *, unsigned long, unsigned short),
  53.             const char* t, long val,
  54.             long border=FALSE, long place=PLACETEXT_LEFT,
  55.             char style=INSIDECNUMBER) ;
  56.     ~cnumber() ;
  57.     void set(LONG val) ;
  58.     void keystroke(BOOL shifted) ;
  59. };
  60.  
  61. #endif
  62.